<template>
    <div class="error">
        <img :src="require('../../assets/img/error.png')" alt="">
        <p>{{ errorData[errorCode] }}</p>
    </div>
</template>

<script>

import errorData from '@/data/error'; // 导入错误数据

export default {
    props: {
        errorCode: {
            type: Number,
            default: 0
        }
    },
    setup() {
        return {
            errorData
        }
    }
}
</script>

<style lang="less" scoped>
    .error {
        text-align: center;
        padding: 100px 0;
        img {
            width: 100px;
            height: 100px;
        }
        p {
            font-size: 16px;
            color: #666;
            margin-top: 20px;
        }
    }
</style>